﻿using System.Threading.Tasks;
using EventBusTest.Shared;
using Newtonsoft.Json;
using Volo.Abp.DependencyInjection;
using Volo.Abp.EventBus.Distributed;

namespace EventBusTest.Consumer
{
    public class MyEventHandler : IDistributedEventHandler<TestPublishEto>, ITransientDependency
    {
        public async Task HandleEventAsync(TestPublishEto eventData)
        {
            await Task.CompletedTask;

            System.Console.WriteLine(JsonConvert.SerializeObject(eventData));
        }
    }
}
